var content;
var tableHead = '<tr style="height:0px;"><td style="width:100%;height:0px;line-height:0px;"></td><td style="width:150px;height:0px;line-height:0px;text-align:right;"></td></tr>';
$(document).ready(function () {
    content = $("#content");
    reLoad_PortalData();
});

function reLoad_PortalData() {
    ActHttpRequest("sysTask!getMyTask.do",{rows:10}, function (data) {//
        if (data.OK == "OK") {
            var htmlTxt = [];
            if (data.rows && data.rows.length > 0) {
                for (var i = 0; i < data.rows.length; i++) {
                    htmlTxt.push('<tr>');
                    htmlTxt.push('<td style="color:#337ab7"><a href="###"  onClick="open_Detail(\'' + data.rows[i].taskUrl + '\',\'' + data.rows[i].taskTitle + '\')" >' + data.rows[i].taskTitle + '</a></td>');
                    htmlTxt.push('<td style="color:red">' + data.rows[i].createTime + '</td>');
                    htmlTxt.push('</tr>');
                }
            } else {
                htmlTxt.push('<tr><td ><font color="red">没有要显示的数据</font></td></tr>');
            }
            content.html(tableHead + htmlTxt.join(''));
        } else {
            mini.alert(data.msg);
        }
    },null,null,null,null);
}

function open_Detail(url, title) {
   window.top.windowtab.addTab(title, url,url);
}
